package com.navi.loaddata.core.oracleEntity;

import com.navi.loaddata.core.oracleEntity.array.EtlArrayGlassV;
import com.navi.loaddata.core.oracleEntity.array.EtlArrayPdsGlassV;
import com.navi.loaddata.core.oracleEntity.cell1.EtlCellComponentV;
import com.navi.loaddata.core.oracleEntity.cell1.EtlCellPdsComponentV;
import com.navi.loaddata.core.oracleEntity.cell2.EtlCell2ChipV;
import com.navi.loaddata.core.oracleEntity.cell2.EtlCell2PdsChipV;
import com.navi.loaddata.core.oracleEntity.cf.EtlCfGlassV;
import com.navi.loaddata.core.oracleEntity.cf.EtlCfPdsGlassV;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * Created by Jay on 2018/3/27.
 */

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface EtlPdsGlassVMapper {

    EtlPdsGlassVMapper INSTANCE = Mappers.getMapper(EtlPdsGlassVMapper.class);

    EtlArrayPdsGlassV etlGlassToArray(EtlPdsGlassV glassVMapper);
    List<EtlArrayPdsGlassV> etlGlassToArray(List<EtlPdsGlassV> list);


    @Mapping(target = "groupId", source = "lotId")//属性名不一致映射
    EtlCfPdsGlassV etlGlassToCf(EtlPdsGlassV glassVMapper);
    List<EtlCfPdsGlassV> etlGlassToCf(List<EtlPdsGlassV> list);

    @Mapping(target = "componentId",source = "glassId")//属性名不一致映射
    @Mapping(target = "componentEndTime",source = "glassEndTime")//属性名不一致映射
    @Mapping(target = "componentStartTime", source = "glassStartTime")//属性名不一致映射
    @Mapping(target = "groupId", source = "lotId")//属性名不一致映射
    EtlCellPdsComponentV etlGlassToCell1(EtlPdsGlassV glassVMapper);
    List<EtlCellPdsComponentV> etlGlassToCell1(List<EtlPdsGlassV> list);

    @Mapping(target = "chipEndTime", source = "glassEndTime")//属性名不一致映射
    @Mapping(target = "chipStartTime", source = "glassStartTime")//属性名不一致映射
    @Mapping(target = "groupId", source = "lotId")//属性名不一致映射
    EtlCell2PdsChipV etlGlassToCell2(EtlPdsGlassV glassVMapper);
    List<EtlCell2PdsChipV> etlGlassToCell2(List<EtlPdsGlassV> list);

}
